Thumb

JavaScript Variables

1/21/2020 1:48:11 AM

JavaScript Variables allows string data type. This value stores the data into memory using ‘var’ keyword. This var keyword variable store the many type of data. It is auto data type convert by the value type. Sometime called ‘var’ is a JavaScript reserved keyword.

Now given bellow the code and explain the code:

<script type="text/javascript">
var double = 3.14;
console.log(double);
var intger=100;
console.log(intger);
var name = "Farhan Sakib";
console.log(name);
var char='J';
console.log(char);
</script>

We can see the JavaScript variable with declare using var keyword but right-side value type variable auto converts data type.